pub fn is_isomorphic(s: String, t: String) -> bool {
    use std::collections::HashMap;
    let mut map: HashMap<char, char> = HashMap::new();
    let s: Vec<char> = s.chars().collect();
    let t: Vec<char> = t.chars().collect();
    let mut maped_chars = Vec::new();

    for i in 0..s.len() {
        let cs = s[i];
        let ct = t[i];
        let cs_map = match map.get(&cs) {
            Some(map_c) => map_c,
            None => {
                if maped_chars.contains(&ct) {
                    return false;
                }
                maped_chars.push(ct);
                map.insert(cs, ct);
                &ct
            }
        };
        if *cs_map != ct {
            return false;
        }
    }

    return true;
}
